{include file="header.htm" /}
<script type="text/javascript" src="__PUBLIC__/plugins/colpick/js/colpick.js"></script>
<link href="__PUBLIC__/plugins/colpick/css/colpick.css" rel="stylesheet" type="text/css"/>
<style>
#picker {border:solid 1px ff6565;width:70px;height:20px;border-right:40px solid green;}
</style>
<body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    {include file="bar.htm" /}
    <form class="form-horizontal" id="post_form" action="{:weapp_url('Monkcityser/Monkcityser/conf')}" method="post">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label for="title">标题</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="title" value="{$row.title}" id="title" class="input-txt">
                    <span class="err"></span>
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="en_title">英文标题</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="en_title" value="{$row.en_title}" id="en_title" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">选填</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="gd_key"><em>*</em>高德 Key</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="gd_key" value="{$row.gd_key}" placeholder="高德 Key" id="gd_key" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2"><a href="https://console.amap.com/dev/key/app" target="_blank">申请高德地图Key</a></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="gd_pwd"><em>*</em>安全密钥</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="gd_pwd" value="{$row.gd_pwd}" placeholder="安全密钥" id="gd_pwd" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2"><a href="https://console.amap.com/dev/key/app" target="_blank">申请高德地图Key</a></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="uname">主题颜色</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="theme_color" value="{$row.theme_color|default='#ec6722'}" id="picker" style="border-color: {$row.theme_color|default='#ec6722'};" />
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="content_width">网站主体宽度</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="content_width" value="{$row.content_width|default='1200'}" class="input-txt">
                     <p class="notic2">网站内容部分的宽度，如并不熟悉。可联系Q 276294319</p>
                </dd>
            </dl>
            <div class="bot mt20">
                <input type="hidden" name="code" value="{$row.code}" />
                <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    // 判断输入框是否为空
    function checkForm(){
        if($('input[name=gd_key]').val() == ''){
            showErrorMsg('高德Key不能为空！');
            $('input[name=gd_key]').focus();
            return false;
        }
        if($('input[name=gd_pwd]').val() == ''){
            showErrorMsg('安全密钥不能为空！');
            $('input[name=gd_pwd]').focus();
            return false;
        }
        layer_loading('正在处理');
        $('#post_form').submit();
    }
    $(document).ready(function(){
    // 颜色选择
    $('#picker').colpick({
            flat:false,
            layout:'rgbhex',
            submit:0,
            colorScheme:'light',
            color:$('#picker').val(),
            onChange:function(hsb,hex,rgb,el,bySetColor) {
                $(el).css('border-color','#'+hex);
                // Fill the text box just if the color was set using the picker, and not the colpickSetColor function.
                if(!bySetColor) $(el).val('#'+hex);
            }
        }).keyup(function(){
            $(this).colpickSetColor('#'+this.value);
        });
    });
</script>
{include file="footer.htm" /}